#ifndef SOUNDMODEL_H
#define SOUNDMODEL_H

#include <QAbstractTableModel>
#include <QList>
#include <QDomDocument>
#include "aed_sound.h"

class SoundModel : public QAbstractTableModel
{
    Q_OBJECT
    QList<AED_Sound*> m_sounds;
public:
    explicit SoundModel(QObject *parent = 0);
    int rowCount(const QModelIndex & parent = QModelIndex()) const;
    int columnCount(const QModelIndex & parent = QModelIndex()) const;
    QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const;
    QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
    //bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
    Qt::ItemFlags flags(const QModelIndex &index) const;
signals:

public slots:
    void LoadSound(const QString &path);
    void LoadSound(const QString &idpath, const QString &realpath);
    void EraseSound(int index);
    AED_Sound* GetSound(int index);
    AED_Sound* GetSound(const QString &path);
    void Save(QDomDocument &doc, QDomElement &header);
    bool Load(QDomElement &header, QString &scene_path);
    void UpdatePaths(const QString &path);
    void Clean();

};


#endif // SOUNDMODEL_H
